home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 October / EnigmA AMIGA RUN 01 (1995)(G.R. Edizioni)(IT)[!][issue 1995-10][Aminet 7].iso / Aminet / dev / amos / AMOSL0495.lzh / AMOSLIST / 000038_amos-request@svcs1.digex.net_Sat Apr 8 13:34:54 1995.msg < prev    next >
Internet Message Format  |  1995-05-01  |  2KB

  1. Received: from svcs1.digex.net by nfs1.digex.net with SMTP id AA14962
  2.   (5.67b8/IDA-1.5); Sat, 8 Apr 1995 13:34:52 -0400
  3. Received: by svcs1.digex.net id AA09561
  4.   (5.67b8/IDA-1.5 for amos-out); Sat, 8 Apr 1995 09:24:41 -0400
  5. Received: from nfs2.digex.net by svcs1.digex.net with SMTP id AA09557
  6.   (5.67b8/IDA-1.5 for <amos@svcs1.digex.net>); Sat, 8 Apr 1995 09:24:39 -0400
  7. Received: from goober.mbhs.edu by nfs2.digex.net with SMTP id AA06282
  8.   (5.67b8/IDA-1.5 for <amos-list@access.digex.net>); Sat, 8 Apr 1995 09:24:05 -0400
  9. Received: from dragon.mbhs.edu by goober.mbhs.edu (AIX 3.2/UCB 5.64/4.03)
  10.           id AA20364; Sat, 8 Apr 1995 09:25:50 -0400
  11. Date: Sat, 8 Apr 1995 09:25:50 -0400
  12. Message-Id: <9504081325.AA20364@goober.mbhs.edu>
  13. From: achurch@dragon.mbhs.edu (Andy Church)
  14. To: amos-list@access.digex.net
  15. Subject: Re: stdin/stdout
  16. Reply-To: achurch@goober.mbhs.edu
  17. X-Mailer: MMail v4.20
  18. Status: O
  19. X-Status: 
  20.  
  21. >    2: <This method is a little trickier but not too difficult>
  22.  
  23.   If you use this, you need to make the changes indicated below:
  24.  
  25.     Old                New
  26.     ---                ---
  27.     A$="*"
  28.     Areg(1)=Varptr(A$)        Dreg(1)=Varptr(A$)
  29.                     Dreg(2)=1005
  30.     MYIO=Doscall(LVO("Open")) (or)  MYIO=Doscall(-30)
  31.  
  32. >    Then you use the contents of MYIO and use the following fragments
  33. >    to do IO:
  34.  
  35.     IN:
  36.     inbuf$=space$(30)
  37.     areg(1)=MYIO            Dreg(1)=MYIO
  38.     areg(2)=Varptr(inbuf$)        Dreg(2)=Varptr(INBUF$)
  39.     dreg(0)=1            Dreg(3)=Len(INBUF$)
  40.     z=Doscall(LVO("Read"))      (or)  z=Doscall(-42)
  41.  
  42.     OUT:
  43.     outbuf$="Hello world"
  44.     areg(1)=MYIO            Dreg(1)=MYIO
  45.     areg(2)=Varptr(outbuf$)        Dreg(2)=Varptr(OUTBUF$)
  46.                     Dreg(3)=Len(OUTBUF$)
  47.     z=Doscall(LVO("Write"))      (or)  z=Doscall(-48)
  48.  
  49. >    Finally, when you are done, you have to close the file:
  50.  
  51.     areg(1)=MYIO            Dreg(1)=MYIO
  52.     z=Doscall(LVO"Close")        z=Doscall(LVO("Close"))
  53.                   (or)  z=Doscall(-36)
  54.  
  55. >I don't know the numbers by heart either... drat.  If you have the RKM 
  56. >look up "Interactive".  That's the mode you want.
  57. >
  58. >This: Dreg(0)=Label("IsInteractive") will probably do it.
  59.  
  60.   No - IsInteractive is a function that returns whether a file is
  61. interactive (e.g. a Shell window).  The mode, as shown above, is 1005
  62. (AmigaDOS's MODE_OLDFILE).
  63.  
  64.   --Andy Church (achurch@goober.mbhs.edu)
  65.     WWW: http://www.mbhs.edu/~achurch/
  66.     AMOS Web Site: http://www.mbhs.edu/~achurch/amos/